<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<c:out value="xiaoming.."></c:out>
<c:set var="name1" scope="request" value="1"></c:set>
<c:if test="${requestScope.name1>0 }">
	if 标签中内容
</c:if>
<%
out.print("使用for循环：");
int[] arr = {1,2,4,5,6,7,8,9,10};
for(int var :arr){
	out.print(var);
}
//把数组对象缓存到 request对象
request.setAttribute("myArr", arr);
%>

<br>
foreach迭代标签：
<c:forEach begin="1" end="10" step="2" var="eachVale">
	<c:out value="${eachVale }"></c:out>
</c:forEach>
<br/>
<c:out value="foreach标签进行的数据遍历："></c:out>
<c:forEach  items="${requestScope.myArr }" var="eachVale">
	<c:out value="${eachVale }"></c:out>
</c:forEach>
</body>
</html>